<template>
	<view>
		<scroll-view scroll-y="true" class="content" :enhanced="true" :bounces="false" :show-scrollbar="false">
			<view class="background">
				<!-- <image class="bottom" :src="background_img+'/upload/%E5%BA%95%E5%9B%BE%E7%81%B0.jpg'" mode="widthFix">
		</image> -->
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background_img: uni.getStorageSync('setUrl'),
			}
		},
		onLoad() {
			let user = uni.getStorageSync('userInfo')
			if (user) {
				setTimeout(() => {
					uni.reLaunch({
						url: '/pages/role/index'
					})
				}, 500)
			} else {
				setTimeout(() => {
					uni.reLaunch({
						url: '/pages/login/index'
					})
				}, 500)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		//可视高度，需要在多大的盒子中进行滑动
		height: 100vh;
		width: 100%;
	}

	.background {
		height: 100vh;
		width: 100%;

		.bottom {
			width: 100%;
			// position: absolute;
			// bottom: 0;
		}
	}
</style>